import Vue from 'vue';
import locale from '@/config/locale';
import storage from '@/utils/storage';

Vue.mixin({
  name: 'mixin',
  methods: {
    ...storage,
    // 相当于定义全局方法
    $field: function(key) {
      return locale.FIELDS[key];
    },
    $msg: function(key) {
      return locale.MESSAGES[key];
    },
  },
});
